Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@types/pino-http
Advanced tools
TypeScript definitions for pino-http
npm install --save @types/pino-http
This package contains type definitions for pino-http (https://github.com/pinojs/pino-http#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/pino-http.
import { IncomingMessage, ServerResponse } from "http";
import { DestinationStream, Level, Logger, LoggerOptions } from "pino";
export = PinoHttp;
declare function PinoHttp(opts?: PinoHttp.Options, stream?: DestinationStream): PinoHttp.HttpLogger;
declare function PinoHttp(stream?: DestinationStream): PinoHttp.HttpLogger;
declare namespace PinoHttp {
interface HttpLogger {
(req: IncomingMessage, res: ServerResponse, next?: () => void): void;
logger: Logger;
}
type ReqId = number | string | object;
/**
* Options for pino-http
*
* See https://github.com/pinojs/pino-http#pinohttpopts-stream
*/
interface Options extends LoggerOptions {
logger?: Logger | undefined;
genReqId?: GenReqId | undefined;
useLevel?: Level | undefined;
stream?: DestinationStream | undefined;
autoLogging?: boolean | AutoLoggingOptions | undefined;
customLogLevel?: ((res: ServerResponse, error: Error) => Level) | undefined;
customSuccessMessage?: ((res: ServerResponse) => string) | undefined;
customErrorMessage?: ((error: Error, res: ServerResponse) => string) | undefined;
customAttributeKeys?: CustomAttributeKeys | undefined;
wrapSerializers?: boolean | undefined;
reqCustomProps?: ((req: IncomingMessage, res: ServerResponse) => object) | undefined;
quietReqLogger?: boolean | undefined;
}
interface GenReqId {
(req: IncomingMessage): ReqId;
}
interface AutoLoggingOptions {
ignore?: (req: IncomingMessage) => boolean;
ignorePaths?: Array<string | RegExp> | undefined;
getPath?: ((req: IncomingMessage) => string | undefined) | undefined;
}
interface CustomAttributeKeys {
req?: string | undefined;
res?: string | undefined;
err?: string | undefined;
reqId?: string | undefined;
responseTime?: string | undefined;
}
const startTime: unique symbol;
}
declare module "http" {
interface IncomingMessage {
id: PinoHttp.ReqId;
log: Logger;
}
interface ServerResponse {
err?: Error | undefined;
}
interface OutgoingMessage {
[PinoHttp.startTime]: number;
}
}
These definitions were written by Christian Rackerseder, Jeremy Forsythe, Griffin Yourick, and Jorge Barnaby.
FAQs
TypeScript definitions for pino-http
The npm package @types/pino-http receives a total of 74,407 weekly downloads. As such, @types/pino-http popularity was classified as popular.
We found that @types/pino-http demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.